package com.atguigu.gmall.activity.service;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.activity.SeckillGoods;
import com.atguigu.gmall.model.activity.UserRecode;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface SeckillGoodsService extends IService<SeckillGoods> {
    List<SeckillGoods> findAll();

    SeckillGoods getSeckillGoods(Long skuId);

    /**
     * 预下单处理
     * @param skuId
     * @param skuIdStr
     * @param userId
     * @return
     */
    Result seckillOrder(Long skuId, String skuIdStr, String userId);

    void seckillUser(UserRecode userRecode);

    void seckillStock(Long skuId);

    Result checkOrder(Long skuId, String userId);

    Map<String, Object> seckillTradeData(String userId);
}
